import Vue from 'vue'
import App from '@/App.vue'
import router from '@/router'
import store from '@/store'
import config from './config'


import elementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(elementUI);

import ViewUI from 'view-design'
import 'view-design/dist/styles/iview.css'
Vue.use(ViewUI);


import { directive as clickOutside } from 'v-click-outside-x'
import OrgTree from 'v-org-tree'
import 'v-org-tree/dist/v-org-tree.css'
Vue.use(OrgTree);
Vue.directive('clickOutside', clickOutside);

import SelfTable from '@/components/table/self-table.vue'
Vue.component("self-table",SelfTable);


Vue.config.productionTip = false;
Vue.prototype.$config = config; //全局注册应用配置

import { YearMonthDay,YearMonthDayHoursMinutesSeconds,YearMonth } from '@/utils/date.js'
Vue.prototype.$YEAR_MONTH_DAY = YearMonthDay;
Vue.prototype.$YEAR_MONTH = YearMonth;
Vue.prototype.$YEAR_MONTH_DAY_HOURS_MINUTES_SECONDS = YearMonthDayHoursMinutesSeconds;

const validated = require("@/utils/validate.js");
Vue.prototype.$validated = validated;

import { checkPointPermission } from '@/utils/check_point_permission.js'

Vue.prototype.$permissionPoint = checkPointPermission;


import eCharts from 'echarts';
Vue.prototype.$echarts = eCharts;

import { getToken } from "@/utils/tool";
Vue.prototype.$token = getToken();




new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');
